package com.egao.common.module.cooperative.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.egao.common.core.web.JsonResult;
import com.egao.common.core.web.PageParam;
import com.egao.common.module.cooperative.entity.CooperativeProject;
import com.egao.common.module.cooperative.entity.vo.CooperativeProjectListVO;

import java.util.List;

/**
 * 产教融合项目服务接口
 * @author root
 */
public interface CooperativeProjectService extends IService<CooperativeProject> {

    /**
     * 项目分页列表
     * @param page
     * @return
     */
    List<CooperativeProjectListVO> listPage(PageParam<CooperativeProject> page);

    /**
     * 添加
     * @param cooperativeProject
     * @return
     */
    JsonResult addCooperativeProject(CooperativeProject cooperativeProject);

    /**
     * 修改
     * @param cooperativeProject
     * @return
     */
    JsonResult updateCooperativeProject(CooperativeProject cooperativeProject);

    /**
     * 删除
     * @param id 主键
     * @return
     */
    JsonResult deleteCooperativeProject(Integer id);

    /**
     * 详情
     * @param id 主键
     * @param role 角色名称
     * @return
     */
    JsonResult detail(Integer id, String role);

    /**
     * 公开的项目
     * @param page
     * @return
     */
    List<CooperativeProjectListVO> listPagePublicity(PageParam<CooperativeProject> page);

    /**
     * 添加点击量
     * @param id
     */
    void addHits(Integer id);

    /**
     * 添加点击量
     * @param cooperativeProject
     */
    void addHits(CooperativeProject cooperativeProject);

}
